/*
 * @Description: 路由配置
 * @Author: rendc
 * @Date: 2021-10-20 09:19:02
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-10-29 14:22:43
 */
export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user',
        routes: [
          {
            name: 'login',
            path: '/user/login',
            component: './user/Login',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/welcome',
    name: '研学大屏',
    icon: 'smile',
    component: './Welcome',
  },
  {
    path: '/admin',
    name: '网站配置',
    icon: 'crown',
    access: 'canAdmin',
    component: './Admin',
    routes: [
      {
        path: '/admin/sub-page',
        name: '轮播图',
        icon: 'smile',
        component: './Welcome',
      },
      {
        path: '/admin/sub-page',
        name: '变量配置',
        icon: 'smile',
        component: './Welcome',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/admin',
    name: '网站咨询',
    icon: 'crown',
    access: 'canAdmin',
    component: './Admin',
    routes: [
      {
        path: '/admin/sub-page',
        name: '咨询列表',
        icon: 'smile',
        component: './Welcome',
      },
      {
        path: '/admin/sub-page',
        name: '分类管理',
        icon: 'smile',
        component: './Welcome',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/admin',
    name: '项目管理',
    icon: 'crown',
    access: 'canAdmin',
    component: './Admin',
    routes: [
      {
        path: '/admin/sub-page',
        name: '我的项目',
        icon: 'smile',
        component: './Welcome',
      },
      {
        path: '/admin/sub-page',
        name: '项目管理',
        icon: 'smile',
        component: './Welcome',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/admin',
    name: '角色权限',
    icon: 'crown',
    access: 'canAdmin',
    component: './Admin',
    routes: [
      {
        path: '/admin/sub-page',
        name: '用户管理',
        icon: 'smile',
        component: './Welcome',
      },
      {
        path: '/admin/sub-page',
        name: '权限管理',
        icon: 'smile',
        component: './Welcome',
      },
      {
        path: '/admin/sub-page',
        name: '角色管理',
        icon: 'smile',
        component: './Welcome',
      },
      {
        component: './404',
      },
    ],
  },
  {
    name: '学生申请',
    icon: 'table',
    path: '/list',
    component: './TableList',
  },
  {
    name: '个人信息',
    icon: 'table',
    path: '/list',
    component: './TableList',
  },
  {
    name: 'list.table-list',
    icon: 'table',
    path: '/list',
    component: './TableList',
  },
  {
    name: 'list.new-page',
    icon: 'table',
    path: '/newPage',
    component: './NewPage',
  },
  {
    name: 'list.new-page2',
    icon: 'table',
    path: '/newPage2',
    component: './NewPage2',
  },
  {
    path: '/',
    redirect: '/welcome',
  },
  {
    component: './404',
  },
];
